package com.example.utils;

import java.util.ArrayList;
import java.util.List;

public class ListUtils {

    /***
     * list1中移除list2中相同的元素
     *
     * @param sourceList 原始list
     * @param targetList 要移除的list
     * @return 移除后的list
     */
    public static List<Long> remove(List<Long> sourceList, List<Long> targetList) {
        List<Long> result = new ArrayList<>(sourceList);
        result.removeAll(targetList);
        return result;
    }
}
